package com.dps.recommend.utils;


import java.security.SecureRandom;
import java.util.UUID;

public class IdGenerate {
    private static SecureRandom random = new SecureRandom();
    private static IdWorker idWorker = new IdWorker(-1L, -1L);

    public IdGenerate() {
    }

    public static String uuid() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }

    public static long randomLong() {
        return Math.abs(random.nextLong());
    }

    public static String nextId() {
        return String.valueOf(idWorker.nextId());
    }
}